
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
About the PowerBuilder extended attribute system tables</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="connpbp87.htm">Previous</A>&nbsp;&nbsp;<A HREF="connpbp89.htm" >Next</A>
<!-- End Header -->
<A NAME="CCJDBDCC"></A><h1>About the PowerBuilder extended attribute system tables</h1>
<A NAME="TI1728"></A><p>PowerBuilder uses a collection of five system tables (formerly
known as the Powersoft repository) to store extended attribute information
(such as display formats, validation rules, and font information)
about tables and columns in your database. You can also define extended
attributes when you create or modify a table in PowerBuilder.</p>
<A NAME="TI1729"></A><p>This section tells you how to:<A NAME="TI1730"></A>
<ul>
<li class=fi>Make sure the PowerBuilder extended attribute system tables
are created with the proper access rights when you log in to your
database for the first time </li>
<li class=ds>Display and open a PowerBuilder extended attribute
system table</li>
<li class=ds>Understand the kind of information stored in the PowerBuilder extended attribute
system tables</li>
<li class=ds>Control extended attribute system table access
</li>
</ul>
</p>
<A NAME="TI1731"></A><h2>Logging in to your database for the first time</h2>
<A NAME="TI1732"></A><p>By default, PowerBuilder creates the extended attribute system
tables the first time you connect to a database.</p>
<A NAME="TI1733"></A><p>To ensure that PowerBuilder creates the extended attribute system
tables with the proper access rights to make them available to all
users, the first person to connect to the database with PowerBuilder must
log in with the proper authority.</p>
<A NAME="TI1734"></A><p><img src="images/proc.gif" width=17 height=17 border=0 align="bottom" alt="Steps"> To ensure proper creation of the PowerBuilder extended
attribute system tables:</p>
<ol><li class=fi><p>Make sure the first person to connect to
the database with PowerBuilder has sufficient authority to create
tables and grant permissions to PUBLIC.</p><p>This means that the first person to connect to the database
should log in as the database owner, database administrator, system
user, system administrator, or system owner, as specified by your
DBMS.</p></li></ol>
<br><p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Creating the extended attribute system tables when
using the DirectConnect interface</span> <A NAME="TI1735"></A>When you are using the DirectConnect interface, the PowerBuilder extended attribute
system tables are <i>not</i> created automatically
the first time you connect to a database. You must run the <i>DB2SYSPB.SQL</i> script
to create the system tables, as described in <A HREF="connpbp80.htm#X-REF354461628">"Using the DB2SYSPB.SQL
script"</A>. </p>
<A NAME="TI1736"></A><h2>Displaying the PowerBuilder extended attribute system
tables</h2>
<A NAME="TI1737"></A><p>PowerBuilder updates the extended attribute system tables automatically whenever
you change the information for a table or column. The PowerBuilder extended
attribute system tables are different from the system tables provided by
your DBMS.</p>
<A NAME="TI1738"></A><p>You can display and open PowerBuilder extended attribute system
tables in the Database painter just like other tables.</p>
<A NAME="TI1739"></A><p><img src="images/proc.gif" width=17 height=17 border=0 align="bottom" alt="Steps"> To display the PowerBuilder extended attribute system
tables:</p>
<ol><li class=fi><p>In the Database painter, highlight Tables
in the list of database objects for the active connection and select
Show System Tables from the pop-up menu.</p><br><img src="images/cn6st.gif"><br>
</li>
<li class=ds><p>The PowerBuilder extended attribute system tables
and DBMS system tables display in the tables list, as follows:<A NAME="TI1740"></A>
<ul>
<li class=fi><b>PowerBuilder system
tables</b>   The five system tables are: <b>pbcatcol</b>, <b>pbcatedt</b>, <b>pbcatfmt</b>, <b>pbcattbl</b>,
and <b>pbcatvld</b>.</li>
<li class=ds><b>DBMS system tables</b>   The system tables supplied by the DBMS usually have a DBMS-specific
prefix (such as <i>sys</i> or <i>dbo</i>).<br><img src="images/cn6std.gif">

</li>
</ul>

                      </p></li>
<li class=ds><p>Display the contents of a PowerBuilder system table
in the Object Layout, Object Details, and/or Columns views.</p><p>For instructions, see the <i>Users
Guide</i>
.</p><p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Do not edit the extended attribute system tables</span> <A NAME="TI1741"></A>Do not change the values in the PowerBuilder extended attribute
system tables.</p>
</li></ol>
<br><A NAME="TI1742"></A><h2>Contents of the extended attribute system tables</h2>
<A NAME="TI1743"></A><p>PowerBuilder stores five types of extended attribute information
in the system tables as described in <A HREF="connpbp88.htm#BABIABJH">Table 12-1</A>. </p>
<A NAME="BABIABJH"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><caption>Table 12-1: Extended attribute system tables</caption>
<tr><th  rowspan="1"  ><A NAME="TI1744"></A>System table</th>
<th  rowspan="1"  ><A NAME="TI1745"></A>Information about</th>
<th  rowspan="1"  ><A NAME="TI1746"></A>Attributes</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1747"></A><b>pbcatcol</b></td>
<td  rowspan="1"  ><A NAME="TI1748"></A>Columns</td>
<td  rowspan="1"  ><A NAME="TI1749"></A>Names, comments, headers, labels, case,
initial value, and justification</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1750"></A><b>pbcatedt</b></td>
<td  rowspan="1"  ><A NAME="TI1751"></A>Edit styles</td>
<td  rowspan="1"  ><A NAME="TI1752"></A>Edit style names and definitions</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1753"></A><b>pbcatfmt</b></td>
<td  rowspan="1"  ><A NAME="TI1754"></A>Display formats</td>
<td  rowspan="1"  ><A NAME="TI1755"></A>Display format names and definitions</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1756"></A><b>pbcattbl</b></td>
<td  rowspan="1"  ><A NAME="TI1757"></A>Tables</td>
<td  rowspan="1"  ><A NAME="TI1758"></A>Name, owner, default fonts (for data, headings
and labels), and comments</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1759"></A><b>pbcatvld</b></td>
<td  rowspan="1"  ><A NAME="TI1760"></A>Validation rules</td>
<td  rowspan="1"  ><A NAME="TI1761"></A>Validation rule names and definitions</td>
</tr>
</table>
<A NAME="TI1762"></A><p>For more about the PowerBuilder system tables, see the Appendix
in the <i>Users Guide</i>
.</p>
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Prefixes in system table names</span> <A NAME="TI1763"></A>For some databases, PowerBuilder precedes the name of the system
table with a default DBMS-specific prefix. For example, the names
of PowerBuilder system tables have the prefix <b>DBO</b> in
a <ACRONYM title = "sequel" >SQL</ACRONYM> Server database (such
as <b>DBO.pbcatcol</b>), or <b>SYSTEM</b> in
an Oracle database (such as <b>SYSTEM.pbcatfmt</b>).</p>
<A NAME="TI1764"></A>The preceding table gives the base name of each system table
without the DBMS-specific prefix.</p>
<A NAME="TI1765"></A><h2>Controlling system table access</h2>
<A NAME="TI1766"></A><p>To control access to the PowerBuilder system tables at your
site, you can specify that PowerBuilder not create or update the system
tables or that the system tables be accessible only to certain users
or groups.</p>
<A NAME="TI1767"></A><p>You can control system table access by doing any of the following:<A NAME="TI1768"></A>
<ul>
<li class=fi><b>Setting Use Extended
Attributes</b>   Set the Use Extended Attributes database preference in the
Database Preferences dialog box in the Database painter.</li>
<li class=ds><b>Setting Read Only</b>   Set the Read Only database preference in the Database Preferences
dialog box in the Database painter.</li>
<li class=ds><b>Granting permissions on the system
tables</b>   Grant explicit permissions on the system tables to users or
groups at your site.
</li>
</ul>
</p>
<A NAME="TI1769"></A><h3>Setting Use Extended Attributes or Read Only to
control access</h3>
<A NAME="TI1770"></A><p><img src="images/proc.gif" width=17 height=17 border=0 align="bottom" alt="Steps"> To control system table access by setting Use
Extended Attributes or Read Only:</p>
<ol><li class=fi><p>Select Design&gt;Options from the
menu bar to display the Database Preferences dialog box.</p><br><img src="images/cn6share.gif"><br>
</li>
<li class=ds><p>On the General page, set values for Use Extended
Attributes or Read Only as follows:</p><A NAME="TI1771"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><tr><th  rowspan="1"  ><A NAME="TI1772"></A>Preference</th>
<th  rowspan="1"  ><A NAME="TI1773"></A>What you do</th>
<th  rowspan="1"  ><A NAME="TI1774"></A>Effect</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1775"></A>Use Extended Attributes</td>
<td  rowspan="1"  ><A NAME="TI1776"></A>Clear the check box</td>
<td  rowspan="1"  ><A NAME="TI1777"></A>Does not create the PowerBuilder system
tables if they do not exist. Instead, the painter uses the appropriate
default values for extended attributes (such as headers, labels,
and text color).<A NAME="TI1778"></A><p>If the PowerBuilder system tables already exist, PowerBuilder does
not use them when you create a new DataWindow object.</p></td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1779"></A>Read Only</td>
<td  rowspan="1"  ><A NAME="TI1780"></A>Select the check box</td>
<td  rowspan="1"  ><A NAME="TI1781"></A>If the PowerBuilder system tables already
exist, PowerBuilder uses them when you create a new DataWindow object, <i>but
does not update them</i>.<A NAME="TI1782"></A><p>You <i>cannot</i> modify (update) information
in the system tables or any other database tables in the DataWindow painter when the
Read Only check box is selected.</p></td>
</tr>
</table>
</li>
<li class=ds><p>Click OK.</p><p>PowerBuilder applies the preference settings to the current
connection and all future connections and saves them in the registry.</p></li></ol>
<br><A NAME="TI1783"></A><h3>Granting permissions on system tables to control
access</h3>
<A NAME="TI1784"></A><p>If your DBMS supports <ACRONYM title = "sequel" >SQL</ACRONYM> <b>GRANT</b> and <b>REVOKE</b> statements,
you can control access to the PowerBuilder system tables. The default
authorization for each repository table is:</p>
<A NAME="TI1785"></A><p><p><PRE>GRANT SELECT, UPDATE, INSERT, DELETE ON <i>table</i> TO PUBLIC</PRE></p>
</p>
<A NAME="TI1786"></A><p>After the system tables are created, you can (for example)
control access to them by granting <b>SELECT</b> authority
to end users and <b>SELECT</b>, <b>UPDATE</b>, <b>INSERT</b>,
and <b>DELETE</b> authority to developers. This technique
offers security and flexibility that is enforced by the DBMS itself.</p>

